package com.ezcolour.ticket.dao;

import com.ezcolour.ticket.model.VocalBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface VocalBeanDao extends JpaRepository<VocalBean,Long> {
    @Query("select vo from VocalBean vo where vo.username = ?1 and vo.priceId = ?2 ")
    List<VocalBean> findByPriceId(String username,String priceId);

    @Query("select vo from VocalBean vo where vo.username = ?1 and vo.status = ?2")
    List<VocalBean> findByUsernameAndStatu(String username,Integer status);

    @Query("select vo from VocalBean vo where vo.status = ?1 ")
    List<VocalBean> findAllByStatu(int i);
}
